<?php echo $this->fetch('member.header.html'); ?>
<script type="text/javascript">
function submitData()
{
	var real_name = $('#real_name').val();
	var gender = $('input:radio:checked').val();
	var birthday= $('#birthday').val();
	var im_qq   = $('#im_qq').val();
	var url = REAL_SITE_URL+"/index.php?app=member&act=profile";
	$.post(url,{real_name:real_name,gender:gender,birthday:birthday,im_qq:im_qq},function(data){
			if(data == true){
				msg("操作成功");
			setTimeout(function(){
					window.location.href="<?php echo url('app=member'); ?>";
					},1500);
				}  
	},"json");	
}
</script>
<div id="page-my-profile">
	<div class="page-body my-profile add-address mt10">
		<ul class="padding10">
			<li>
                <label>性别: </label>
                <label><input type="radio" name="gender" value="0" <?php if ($this->_var['profile']['gender'] == 0): ?>checked="checked"<?php endif; ?> />保密  </label>
                <label><input type="radio" name="gender" value="1" <?php if ($this->_var['profile']['gender'] == 1): ?>checked="checked"<?php endif; ?> />男   </label>
                <label><input type="radio" name="gender" value="2" <?php if ($this->_var['profile']['gender'] == 2): ?>checked="checked"<?php endif; ?> />女 </label>
            </li>
            <li class="mt20"><input type="text"  class="input" name="real_name" id="real_name" value="<?php echo htmlspecialchars($this->_var['profile']['real_name']); ?>" placeholder="真实姓名"/></li>
            <li>
                <input type="text"  class="input" placeholder="生日" id="birthday" name="birthday" value="<?php echo htmlspecialchars($this->_var['profile']['birthday']); ?>" />
            </li>
            <li>
                <input type="text"   class="input" id="im_qq" name="im_qq" value="<?php echo htmlspecialchars($this->_var['profile']['im_qq']); ?>" placeholder="QQ"/>
            </li>
            <li>
            <div class="btn-box">
            <input type="button" onclick="submitData();" value="保存修改" />
            </div>
		</ul>
	</div>
</div>
<?php echo $this->fetch('footer.html'); ?>
